// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'

import VueRouter from 'vue-router'
import  { ConfirmPlugin } from 'vux'
Vue.use(ConfirmPlugin)
Vue.use(VueRouter)

import Home from './components/Index'
import Sponsor from './components/Sponsor'
import Activities from './components/Activities'
import Seek from './components/Seek'
import Hobbies from './components/Hobbies'
import Person from './components/Person'
import Bills from './components/Bills'
import ActivityDetail from './components/ActivityDetail'
import Comment from './components/Comment'
import RelatedActivity from './components/RelatedActivity'
import EditActivity from './components/EditActivity'
import ActivityJoin from './components/ActivityJoin'

const routes = [{
    path: '/',
    component: Home
},
    {
        path: '/sponsor',
        component: Sponsor
    },
    {
        path: '/activities',
        component: Activities
    },
    {
        path: '/seek',
        component: Seek
    },
    {
        path: '/hobbies',
        component: Hobbies
    },
    {
        path: '/person',
        component: Person
    },
    {
        path: '/bills',
        component: Bills
    },
    {
        path: '/activitydetail',
        component: ActivityDetail
    },
    {
        path: '/comment',
        component: Comment
    },
    {
        path: '/relatedActivity',
        component: RelatedActivity
    },
    {
        path: '/editActivity',
        component: EditActivity
    },
    {
        path: '/activityJoin',
        component: ActivityJoin
    }
]

const router = new VueRouter({
    routes
})

const FastClick = require('fastclick')
FastClick.attach(document.body)

/* eslint-disable no-new */
new Vue({
    router,
    render: h => h(App)
}).$mount('#app')
